package com.ma.gestureDetectors.Botones;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener;
import com.ma.logica.Sonido;

public class BotonSonidoGestureDetector extends ActorGestureListener {

	public BotonSonidoGestureDetector() {
		super(20, 10.0f, 1.0f, 0.15f);
	}

	@Override
	public void touchDown(InputEvent event, float x, float y, int pointer,int button) {
		Gdx.input.vibrate(80);
		if(Sonido.mute){
			Sonido.mute = false;
			Sonido.musicaPlay();
		}else{
			Sonido.mute = true;
			Sonido.musicaStop();
		}
	}

	@Override
	public void touchUp(InputEvent event, float x, float y, int pointer,int button) {
	}

}
